#include "stdlib.h"
#include "stdio.h"
#include "string.h"




void copy_str(char *from, char *to)
{
	while(*from!='\0')
	{
		*to = *from;
		from++;
		to++;
	}
	*to = '\0';
}

void main()
{
	char *p = "abcdefg";
	//char *p2 = NULL;
	char p2[100] ;
	copy_str(p, p2);

	//strcpy(p2, "abcdeeg");
	printf("p2:%s\n", p2);

	system("pause");
}